package cn.com.se.sharepictrue.application;

import android.app.Application;

import cn.com.se.sharepictrue.bean.UserInfoBean;

/**
 * Created by Administrator on 2015/12/4.
 */
public class Data extends Application {

    private UserInfoBean userInfo = null;

    public void setUserInfo(UserInfoBean userinfo) {
        this.userInfo.setUserInfo(userinfo);
    }

    public UserInfoBean getUserInfo() {
        return userInfo;
    }

    public boolean isLogin() {
        if (userInfo != null)
            return userInfo.isHaveData();
        else
            return false;
    }

    @Override
    public void onCreate() {
        userInfo = new UserInfoBean();
        super.onCreate();
    }
}
